import http from "@/api";

import { ResPage } from "@/api/interface";

import { MessageItemVo, FriendVo } from "@/biz/interface/MessageType";

import { ModuleMainUrl, ModuleUmsUrl, ModuleCommonUrl } from "..";

const moduleUrl = ModuleMainUrl;
const moduleUmsUrl = ModuleUmsUrl;
const moduleCommUrl = ModuleCommonUrl;

// * 获取企业消息统计数字
export const getCpyMessageCntApi = (params: {}) => {
  return http.post<ResPage<MessageItemVo>>(moduleUrl + `/cpymsg/tongji`, params);
};

// * 获取当前用户的好友列表
export const getFriends = (params: {}) => {
  return http.post<ResPage<FriendVo>>(moduleUmsUrl + `/appusr/friends`, params);
};

// * 获取当前用户的好友列表
export const getCpyMessgeListApi = (params: { from: string }) => {
  return http.post(moduleCommUrl + `/comhximapi/gethximmsg`, params);
};
